#ifndef MYLABEL_H
#define MYLABEL_H

#include <QLabel>
#include "myPoint.h"
#include "KeyBoard.h"

class mySudoItem : public QLabel
{
    Q_OBJECT
public:
    explicit mySudoItem(QWidget *parent = 0);
    mySudoItem(const myPoint& point, QWidget *parent = 0);
    mySudoItem(int x, int y, int g, QWidget *parent = 0);
    ~mySudoItem();
    void initConnects();
    void finalConnects();

    myPoint getPoint();
    int getx();
    int gety();
    void setPoint(const myPoint& point);
    void setPoint(int x, int y, int g);

    int getSudoGroup();

protected:
    void focusInEvent(QFocusEvent *ev);
    void focusOutEvent(QFocusEvent *ev);

signals:
    void myButtonClicked(myPoint point);
    void valueChanged(myPoint point);

private slots:
    void onClicked();
    void onKeyBoardResult(int);

private:
    myPoint m_point;
    KeyBoard m_keyBoard;
};

#endif // MYLABEL_H
